import { useState } from "react";
import {createStore} from 'mozz'

export type I18nType = 'zh_cn' | 'zh_en'

export function useI18n() {
  const [local, setLocal] = useState<I18nType>('zh_cn')
  return {local, setLocal}
}

export const {Provider, useStore} = createStore(useI18n)
